A flash memory has advantages such as the ability to hold data after powering down, and its small size. Therefore, the flash memory has conventionally found many applications as recording media for a variety of equipment, such as a digital camera. Conventional methods can be used to control reading and writing data from and to such a flash memory. For example, techniques described in Japanese Patent Laid-Open Publication No. 2003-346106 and Japanese Patent Laid-Open Publication No. Hei 11-110984 may be used.
While the flash memory has advantages as described above, it is known that it may suffer from data corruption due to a phenomenon known as drain disturb. The drain disturb may occur when a difference in the number of rewrites of data increases between blocks which physically constitute the flash memory. Such data corruption caused by the drain disturb may degrade reliability of the flash memory, and in some cases, have adverse effects on control of the equipment which utilizes the flash memory as its recording media.
A technique for preventing data from being corrupted beyond a certain number of data writes to a non-volatile memory is disclosed in Japanese Patent Laid-Open Publication No. Hei 7-287604. According to the Japanese Patent Laid-Open Publication No. Hei 7-287604, the number of writes to a memory is stored in the memory and the stored number is referenced before writing data. In this way, data corruption beyond a certain number of data writes may be reduced.
In the Japanese Patent Laid-Open Publication No. Hei 7-287604, however, data recording may fail when a certain number of data writes is exceeded, because writing of data is disabled. In other words, the technique described in the Japanese Patent Laid-Open Publication No. Hei 7-287604 may cause a memory to be unavailable, and consequently may hamper the proper operation of the equipment which is provided with the memory.
In addition, each of a plurality of data items stored in a single memory has importance which is not equal for each data item, and which may often vary depending on the type of data. The techniques described in the Japanese Patent Laid-Open Publication No. 2003-346106, No. Hei 11-110984, and No. Hei 7-287604 do not address such a difference in importance. Therefore, these techniques do not necessarily provide data protection depending on importance of each data item, and specifically do not provide more reliable protection of important data.